/* static/css/employee.css */
/* 员工信息页面基础样式 */
.employee-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.module-title {
    font-size: 1.5rem;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 80px; /* 设置最小宽度保持按钮大小一致 */
    text-align: center;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn-primary {
    background-color: #4a6cf7;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-export {
    background-color: #28a745;
    color: white;
}

.btn-export:hover {
    background-color: #218838;
}

/* 表格区域样式 - 修改部分 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    table-layout: fixed; /* 新增：固定列宽 */
}

.data-table th,
.data-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    word-break: break-word; /* 新增：长文本自动换行 */
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 列宽设置 - 新增 */
.data-table th:nth-child(1) { width: 80px; }  /* 员工ID */
.data-table th:nth-child(2) { width: 100px; } /* 姓名 */
.data-table th:nth-child(3) { width: 150px; } /* 部门 */
.data-table th:nth-child(4) { width: 150px; } /* 职位 */
.data-table th:nth-child(5) { width: 120px; } /* 入职日期 */
.data-table th:nth-child(6) { width: 80px; }  /* 状态 */
.data-table th:nth-child(7) { width: 200px; } /* 操作 */

/* 操作按钮 - 修改部分 */
.data-table td:last-child {
    width: auto; /* 修改：覆盖原来的80px设置 */
    white-space: nowrap; /* 新增：防止按钮换行 */
}

.btn-action {
    display: inline-block; /* 修改：改为行内块元素 */
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    min-width: 50px; /* 新增：确保按钮宽度一致 */
    text-align: center; /* 新增：文字居中 */
}

.btn-action.view {
    background-color: #17a2b8;
    color: white;
}

.btn-action.edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-action.delete {
    background-color: #dc3545;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-group {
        width: 100%;
    }

    .button-row {
        justify-content: flex-start;
    }
}

/* 状态标签 - 新增样式 */
.status-active {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #28a745;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 以下原有样式保持不变 */
/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-item {
    list-style: none;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    color: #4a6cf7;
    text-decoration: none;
    border-radius: 4px;
}

.page-link:hover {
    background-color: #f8f9fa;
}

.page-active .page-link {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

.status-inactive {
    color: #dc3545;
    font-weight: 500;
}

/* 返回按钮 */
.btn-back {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.btn-back:hover {
    background-color: #5a6268;
}

/* 搜索筛选区域样式 */
.search-filter {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.button-row {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-search {
    background-color: #4a6cf7;
    color: white;
    border: none;
}

.btn-search:hover {
    background-color: #3a5bd9;
}

.btn-reset {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #ddd;
}

.btn-reset:hover {
    background-color: #e9ecef;
}

/* 分页样式 */
.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: center;
    gap: 0.5rem;
}

.pagination li a {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #4a6cf7;
    border-radius: 4px;
}

.pagination li.active a {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}
select.loading {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 12a9 9 0 1 1-6.219-8.56'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
}